//
//  SolutionViewCell.m
//  ForestPack
//
//  Created by 骆锴 on 2018/7/27.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "SolutionViewCell.h"
#import "SolutionModel.h"

@interface SolutionViewCell ()

@end

@implementation SolutionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
        UIView *baseview = [[UIView alloc] initWithFrame:CGRectMake(ScreenX375(0), ScreenX375(0), ScreenX375(170), ScreenX375(130))];
        
        _solutionimg = [[UIImageView alloc] initWithFrame:CGRectMake(ScreenX375(0), ScreenX375(0), ScreenX375(170), ScreenX375(109))];
        _solutionimg.clipsToBounds = YES;
        _solutionimg.image = [UIImage imageNamed:@"背景图片"];
        _solutionimg.layer.cornerRadius = 5.0;
        [baseview addSubview: _solutionimg];
        
        _solutionname =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(0), ScreenX375(116), ScreenX375(150), ScreenX375(14))];
        _solutionname.text = @"森林包装设计";
        _solutionname.font = Kfont(14);
        _solutionname.textColor = REXADECIMALCOLOR(@"#333333");
        _solutionname.textAlignment = NSTextAlignmentLeft;
        [baseview addSubview:_solutionname];
        
        [self addSubview:baseview];
    }
    return self;
}

-(void)initwithSolutionModel:(SolutionModel *)model{
    _solutionimg.image = [UIImage imageNamed:model.pic];
    _solutionname.text = model.name;
}

@end
